var e = getApp(), t = require("../utils/timeUtil.js");

module.exports = Behavior({
    methods: {
        tapProduct: function(i) {
            console.log(i.productTitle);
            var r = i.productType, o = i.productId, d = i.sellTime, l = null;
            if (1 == r) {
                var s = d ? t.timeStringToLong(d) : null, a = new Date().getTime();
                l = s && s > a ? "/pages/presell-detail/presell-detail?id=" + o : e.data.myLineInfo && e.data.myLineInfo.productId == o ? "/pages/series/series?productId=" + o + "&queueId=" + e.data.myLineInfo.memberQueueId : "/pages/series/series?productId=" + o;
            } else 0 == r && (l = e.getMallProductPath(o));
            e.isLogin() ? wx.navigateTo({
                url: l
            }) : e.loginThenRedirectTo(!1, l);
        }
    }
});